package com.simple.datax.db.mybatis.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

/**
 * 
 * @author paladin
 * 
 */
public class DataxSystemLogCriteria {
	protected String orderByClause;

	protected boolean distinct;

	protected List<Criteria> oredCriteria;

	public DataxSystemLogCriteria() {
		oredCriteria = new ArrayList<Criteria>();
	}

	public void setOrderByClause(String orderByClause) {
		this.orderByClause = orderByClause;
	}

	public String getOrderByClause() {
		return orderByClause;
	}

	public void setDistinct(boolean distinct) {
		this.distinct = distinct;
	}

	public boolean isDistinct() {
		return distinct;
	}

	public List<Criteria> getOredCriteria() {
		return oredCriteria;
	}

	public void or(Criteria criteria) {
		oredCriteria.add(criteria);
	}

	public Criteria or() {
		Criteria criteria = createCriteriaInternal();
		oredCriteria.add(criteria);
		return criteria;
	}

	public Criteria createCriteria() {
		Criteria criteria = createCriteriaInternal();
		if (oredCriteria.size() == 0) {
			oredCriteria.add(criteria);
		}
		return criteria;
	}

	protected Criteria createCriteriaInternal() {
		Criteria criteria = new Criteria();
		return criteria;
	}

	public void clear() {
		oredCriteria.clear();
		orderByClause = null;
		distinct = false;
	}

	protected abstract static class GeneratedCriteria {
		protected List<Criterion> criteria;

		protected GeneratedCriteria() {
			super();
			criteria = new ArrayList<Criterion>();
		}

		public boolean isValid() {
			return criteria.size() > 0;
		}

		public List<Criterion> getAllCriteria() {
			return criteria;
		}

		public List<Criterion> getCriteria() {
			return criteria;
		}

		protected void addCriterion(String condition) {
			if (condition == null) {
				throw new RuntimeException("Value for condition cannot be null");
			}
			criteria.add(new Criterion(condition));
		}

		protected void addCriterion(String condition, Object value,
				String property) {
			if (value == null) {
				throw new RuntimeException("Value for " + property
						+ " cannot be null");
			}
			criteria.add(new Criterion(condition, value));
		}

		protected void addCriterion(String condition, Object value1,
				Object value2, String property) {
			if (value1 == null || value2 == null) {
				throw new RuntimeException("Between values for " + property
						+ " cannot be null");
			}
			criteria.add(new Criterion(condition, value1, value2));
		}

		protected void addCriterionForJDBCDate(String condition, Date value,
				String property) {
			if (value == null) {
				throw new RuntimeException("Value for " + property
						+ " cannot be null");
			}
			addCriterion(condition, new java.sql.Date(value.getTime()),
					property);
		}

		protected void addCriterionForJDBCDate(String condition,
				List<Date> values, String property) {
			if (values == null || values.size() == 0) {
				throw new RuntimeException("Value list for " + property
						+ " cannot be null or empty");
			}
			List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
			Iterator<Date> iter = values.iterator();
			while (iter.hasNext()) {
				dateList.add(new java.sql.Date(iter.next().getTime()));
			}
			addCriterion(condition, dateList, property);
		}

		protected void addCriterionForJDBCDate(String condition, Date value1,
				Date value2, String property) {
			if (value1 == null || value2 == null) {
				throw new RuntimeException("Between values for " + property
						+ " cannot be null");
			}
			addCriterion(condition, new java.sql.Date(value1.getTime()),
					new java.sql.Date(value2.getTime()), property);
		}

		public Criteria andLogTimeIsNull() {
			addCriterion("LOG_TIME is null");
			return (Criteria) this;
		}

		public Criteria andLogTimeIsNotNull() {
			addCriterion("LOG_TIME is not null");
			return (Criteria) this;
		}

		public Criteria andLogTimeEqualTo(Date value) {
			addCriterionForJDBCDate("LOG_TIME =", value, "logTime");
			return (Criteria) this;
		}

		public Criteria andLogTimeNotEqualTo(Date value) {
			addCriterionForJDBCDate("LOG_TIME <>", value, "logTime");
			return (Criteria) this;
		}

		public Criteria andLogTimeGreaterThan(Date value) {
			addCriterionForJDBCDate("LOG_TIME >", value, "logTime");
			return (Criteria) this;
		}

		public Criteria andLogTimeGreaterThanOrEqualTo(Date value) {
			addCriterionForJDBCDate("LOG_TIME >=", value, "logTime");
			return (Criteria) this;
		}

		public Criteria andLogTimeLessThan(Date value) {
			addCriterionForJDBCDate("LOG_TIME <", value, "logTime");
			return (Criteria) this;
		}

		public Criteria andLogTimeLessThanOrEqualTo(Date value) {
			addCriterionForJDBCDate("LOG_TIME <=", value, "logTime");
			return (Criteria) this;
		}

		public Criteria andLogTimeIn(List<Date> values) {
			addCriterionForJDBCDate("LOG_TIME in", values, "logTime");
			return (Criteria) this;
		}

		public Criteria andLogTimeNotIn(List<Date> values) {
			addCriterionForJDBCDate("LOG_TIME not in", values, "logTime");
			return (Criteria) this;
		}

		public Criteria andLogTimeBetween(Date value1, Date value2) {
			addCriterionForJDBCDate("LOG_TIME between", value1, value2,
					"logTime");
			return (Criteria) this;
		}

		public Criteria andLogTimeNotBetween(Date value1, Date value2) {
			addCriterionForJDBCDate("LOG_TIME not between", value1, value2,
					"logTime");
			return (Criteria) this;
		}

		public Criteria andLogThreadIsNull() {
			addCriterion("LOG_THREAD is null");
			return (Criteria) this;
		}

		public Criteria andLogThreadIsNotNull() {
			addCriterion("LOG_THREAD is not null");
			return (Criteria) this;
		}

		public Criteria andLogThreadEqualTo(String value) {
			addCriterion("LOG_THREAD =", value, "logThread");
			return (Criteria) this;
		}

		public Criteria andLogThreadNotEqualTo(String value) {
			addCriterion("LOG_THREAD <>", value, "logThread");
			return (Criteria) this;
		}

		public Criteria andLogThreadGreaterThan(String value) {
			addCriterion("LOG_THREAD >", value, "logThread");
			return (Criteria) this;
		}

		public Criteria andLogThreadGreaterThanOrEqualTo(String value) {
			addCriterion("LOG_THREAD >=", value, "logThread");
			return (Criteria) this;
		}

		public Criteria andLogThreadLessThan(String value) {
			addCriterion("LOG_THREAD <", value, "logThread");
			return (Criteria) this;
		}

		public Criteria andLogThreadLessThanOrEqualTo(String value) {
			addCriterion("LOG_THREAD <=", value, "logThread");
			return (Criteria) this;
		}

		public Criteria andLogThreadLike(String value) {
			addCriterion("LOG_THREAD like", value, "logThread");
			return (Criteria) this;
		}

		public Criteria andLogThreadNotLike(String value) {
			addCriterion("LOG_THREAD not like", value, "logThread");
			return (Criteria) this;
		}

		public Criteria andLogThreadIn(List<String> values) {
			addCriterion("LOG_THREAD in", values, "logThread");
			return (Criteria) this;
		}

		public Criteria andLogThreadNotIn(List<String> values) {
			addCriterion("LOG_THREAD not in", values, "logThread");
			return (Criteria) this;
		}

		public Criteria andLogThreadBetween(String value1, String value2) {
			addCriterion("LOG_THREAD between", value1, value2, "logThread");
			return (Criteria) this;
		}

		public Criteria andLogThreadNotBetween(String value1, String value2) {
			addCriterion("LOG_THREAD not between", value1, value2, "logThread");
			return (Criteria) this;
		}

		public Criteria andActionNameIsNull() {
			addCriterion("ACTION_NAME is null");
			return (Criteria) this;
		}

		public Criteria andActionNameIsNotNull() {
			addCriterion("ACTION_NAME is not null");
			return (Criteria) this;
		}

		public Criteria andActionNameEqualTo(String value) {
			addCriterion("ACTION_NAME =", value, "actionName");
			return (Criteria) this;
		}

		public Criteria andActionNameNotEqualTo(String value) {
			addCriterion("ACTION_NAME <>", value, "actionName");
			return (Criteria) this;
		}

		public Criteria andActionNameGreaterThan(String value) {
			addCriterion("ACTION_NAME >", value, "actionName");
			return (Criteria) this;
		}

		public Criteria andActionNameGreaterThanOrEqualTo(String value) {
			addCriterion("ACTION_NAME >=", value, "actionName");
			return (Criteria) this;
		}

		public Criteria andActionNameLessThan(String value) {
			addCriterion("ACTION_NAME <", value, "actionName");
			return (Criteria) this;
		}

		public Criteria andActionNameLessThanOrEqualTo(String value) {
			addCriterion("ACTION_NAME <=", value, "actionName");
			return (Criteria) this;
		}

		public Criteria andActionNameLike(String value) {
			addCriterion("ACTION_NAME like", value, "actionName");
			return (Criteria) this;
		}

		public Criteria andActionNameNotLike(String value) {
			addCriterion("ACTION_NAME not like", value, "actionName");
			return (Criteria) this;
		}

		public Criteria andActionNameIn(List<String> values) {
			addCriterion("ACTION_NAME in", values, "actionName");
			return (Criteria) this;
		}

		public Criteria andActionNameNotIn(List<String> values) {
			addCriterion("ACTION_NAME not in", values, "actionName");
			return (Criteria) this;
		}

		public Criteria andActionNameBetween(String value1, String value2) {
			addCriterion("ACTION_NAME between", value1, value2, "actionName");
			return (Criteria) this;
		}

		public Criteria andActionNameNotBetween(String value1, String value2) {
			addCriterion("ACTION_NAME not between", value1, value2,
					"actionName");
			return (Criteria) this;
		}

		public Criteria andLogLevelIsNull() {
			addCriterion("LOG_LEVEL is null");
			return (Criteria) this;
		}

		public Criteria andLogLevelIsNotNull() {
			addCriterion("LOG_LEVEL is not null");
			return (Criteria) this;
		}

		public Criteria andLogLevelEqualTo(String value) {
			addCriterion("LOG_LEVEL =", value, "logLevel");
			return (Criteria) this;
		}

		public Criteria andLogLevelNotEqualTo(String value) {
			addCriterion("LOG_LEVEL <>", value, "logLevel");
			return (Criteria) this;
		}

		public Criteria andLogLevelGreaterThan(String value) {
			addCriterion("LOG_LEVEL >", value, "logLevel");
			return (Criteria) this;
		}

		public Criteria andLogLevelGreaterThanOrEqualTo(String value) {
			addCriterion("LOG_LEVEL >=", value, "logLevel");
			return (Criteria) this;
		}

		public Criteria andLogLevelLessThan(String value) {
			addCriterion("LOG_LEVEL <", value, "logLevel");
			return (Criteria) this;
		}

		public Criteria andLogLevelLessThanOrEqualTo(String value) {
			addCriterion("LOG_LEVEL <=", value, "logLevel");
			return (Criteria) this;
		}

		public Criteria andLogLevelLike(String value) {
			addCriterion("LOG_LEVEL like", value, "logLevel");
			return (Criteria) this;
		}

		public Criteria andLogLevelNotLike(String value) {
			addCriterion("LOG_LEVEL not like", value, "logLevel");
			return (Criteria) this;
		}

		public Criteria andLogLevelIn(List<String> values) {
			addCriterion("LOG_LEVEL in", values, "logLevel");
			return (Criteria) this;
		}

		public Criteria andLogLevelNotIn(List<String> values) {
			addCriterion("LOG_LEVEL not in", values, "logLevel");
			return (Criteria) this;
		}

		public Criteria andLogLevelBetween(String value1, String value2) {
			addCriterion("LOG_LEVEL between", value1, value2, "logLevel");
			return (Criteria) this;
		}

		public Criteria andLogLevelNotBetween(String value1, String value2) {
			addCriterion("LOG_LEVEL not between", value1, value2, "logLevel");
			return (Criteria) this;
		}

		public Criteria andLogContentIsNull() {
			addCriterion("LOG_CONTENT is null");
			return (Criteria) this;
		}

		public Criteria andLogContentIsNotNull() {
			addCriterion("LOG_CONTENT is not null");
			return (Criteria) this;
		}

		public Criteria andLogContentEqualTo(String value) {
			addCriterion("LOG_CONTENT =", value, "logContent");
			return (Criteria) this;
		}

		public Criteria andLogContentNotEqualTo(String value) {
			addCriterion("LOG_CONTENT <>", value, "logContent");
			return (Criteria) this;
		}

		public Criteria andLogContentGreaterThan(String value) {
			addCriterion("LOG_CONTENT >", value, "logContent");
			return (Criteria) this;
		}

		public Criteria andLogContentGreaterThanOrEqualTo(String value) {
			addCriterion("LOG_CONTENT >=", value, "logContent");
			return (Criteria) this;
		}

		public Criteria andLogContentLessThan(String value) {
			addCriterion("LOG_CONTENT <", value, "logContent");
			return (Criteria) this;
		}

		public Criteria andLogContentLessThanOrEqualTo(String value) {
			addCriterion("LOG_CONTENT <=", value, "logContent");
			return (Criteria) this;
		}

		public Criteria andLogContentLike(String value) {
			addCriterion("LOG_CONTENT like", value, "logContent");
			return (Criteria) this;
		}

		public Criteria andLogContentNotLike(String value) {
			addCriterion("LOG_CONTENT not like", value, "logContent");
			return (Criteria) this;
		}

		public Criteria andLogContentIn(List<String> values) {
			addCriterion("LOG_CONTENT in", values, "logContent");
			return (Criteria) this;
		}

		public Criteria andLogContentNotIn(List<String> values) {
			addCriterion("LOG_CONTENT not in", values, "logContent");
			return (Criteria) this;
		}

		public Criteria andLogContentBetween(String value1, String value2) {
			addCriterion("LOG_CONTENT between", value1, value2, "logContent");
			return (Criteria) this;
		}

		public Criteria andLogContentNotBetween(String value1, String value2) {
			addCriterion("LOG_CONTENT not between", value1, value2,
					"logContent");
			return (Criteria) this;
		}

		public Criteria andLogThreadLikeInsensitive(String value) {
			addCriterion("upper(LOG_THREAD) like", value.toUpperCase(),
					"logThread");
			return (Criteria) this;
		}

		public Criteria andActionNameLikeInsensitive(String value) {
			addCriterion("upper(ACTION_NAME) like", value.toUpperCase(),
					"actionName");
			return (Criteria) this;
		}

		public Criteria andLogLevelLikeInsensitive(String value) {
			addCriterion("upper(LOG_LEVEL) like", value.toUpperCase(),
					"logLevel");
			return (Criteria) this;
		}

		public Criteria andLogContentLikeInsensitive(String value) {
			addCriterion("upper(LOG_CONTENT) like", value.toUpperCase(),
					"logContent");
			return (Criteria) this;
		}
	}

	public static class Criteria extends GeneratedCriteria {

		protected Criteria() {
			super();
		}
	}

	public static class Criterion {
		private String condition;

		private Object value;

		private Object secondValue;

		private boolean noValue;

		private boolean singleValue;

		private boolean betweenValue;

		private boolean listValue;

		private String typeHandler;

		public String getCondition() {
			return condition;
		}

		public Object getValue() {
			return value;
		}

		public Object getSecondValue() {
			return secondValue;
		}

		public boolean isNoValue() {
			return noValue;
		}

		public boolean isSingleValue() {
			return singleValue;
		}

		public boolean isBetweenValue() {
			return betweenValue;
		}

		public boolean isListValue() {
			return listValue;
		}

		public String getTypeHandler() {
			return typeHandler;
		}

		protected Criterion(String condition) {
			super();
			this.condition = condition;
			this.typeHandler = null;
			this.noValue = true;
		}

		protected Criterion(String condition, Object value, String typeHandler) {
			super();
			this.condition = condition;
			this.value = value;
			this.typeHandler = typeHandler;
			if (value instanceof List<?>) {
				this.listValue = true;
			} else {
				this.singleValue = true;
			}
		}

		protected Criterion(String condition, Object value) {
			this(condition, value, null);
		}

		protected Criterion(String condition, Object value, Object secondValue,
				String typeHandler) {
			super();
			this.condition = condition;
			this.value = value;
			this.secondValue = secondValue;
			this.typeHandler = typeHandler;
			this.betweenValue = true;
		}

		protected Criterion(String condition, Object value, Object secondValue) {
			this(condition, value, secondValue, null);
		}
	}
}